import request from '@/utils/request'

const baseResApi = process.env.VUE_APP_BASE_API + '/course/course-resource'
const baseFolderApi = process.env.VUE_APP_BASE_API + '/course/course-resource-folder'

export function listByFolderId(folderId) {
  return request({
    url: `${baseResApi}/list`,
    method: 'get',
    params: { folderId }
  })
}

export function getRootFolder(csId) {
  return request({
    url: `${baseFolderApi}/rootFolder`,
    method: 'get',
    params: { csId }
  })
}
